<template>
    <div class="header">
        <div class="left" @click="$router.go(-1);">
            <slot name="left">
                <i class="iconfont icon-zuo"></i>
                <span>返回</span>
            </slot>
        </div>

        <div>{{title}}</div>
        <div class="right">
            <slot name="right">
            </slot>
        </div>

    </div>
</template>

<script>
export default {
  props: ["title"]
};
</script>

<style scoped>
.header {
  height: 3rem;
  display: flex;
  justify-content: space-between;
  background-color: #42a5f0;
  line-height: 3rem;
  font-size: 1.2rem;
  color: #fff;
}
.header > .right,
.header > .left {
  width: 20vw;
  font-size: 1rem;
  margin-left: 1rem;
  margin-right: 1rem;
}
i {
  font-size: 1.2rem;
  line-height: 3rem;
}
</style>